:root {
    /* 主色调 - 红色系 */
    --primary-red: #ff2a6d;
    --primary-red-light: #ff4d8a;
    --primary-red-dark: #e6005c;
    --primary-red-glow: #ff6b9d;

    /* 主色调 - 粉紫色系 */
    --primary-purple: #d336ff;
    --primary-purple-light: #e05cff;
    --primary-purple-dark: #b300ff;
    --primary-purple-glow: #eb8aff;

    /* 副色调 - 黑色系 */
    --secondary-black: #1a1a1a;
    --secondary-black-light: #2d2d2d;
    --secondary-black-dark: #0d0d0d;

    /* 副色调 - 灰色系 */
    --secondary-gray: #4a4a4a;
    --secondary-gray-light: #666666;
    --secondary-gray-dark: #333333;
    --secondary-gray-bg: #f5f5f5;

    /* 副色调 - 蓝色系 */
    --accent-blue: #00a8ff;
    --accent-blue-light: #4dc3ff;
    --accent-blue-dark: #0088cc;
    --accent-blue-glow: #80d4ff;

    /* 文字颜色 */
    --text-primary: #ffffff;
    --text-secondary: #f48585;
    --text-muted: #999999;
    --text-dark: #333333;

    /* 背景颜色 */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-card: rgba(42, 42, 42, 0.8);
    --bg-overlay: rgba(0, 0, 0, 0.7);

    /* 边框和阴影 */
    --border-primary: #ff2a6d;
    --border-secondary: #4a4a4a;
    --shadow-primary: 0 4px 20px rgba(255, 42, 109, 0.3);
    --shadow-secondary: 0 2px 10px rgba(0, 0, 0, 0.5);
    --shadow-glow: 0 0 20px rgba(255, 42, 109, 0.5);

    /* 字体 */
    font-family: 'Segoe UI', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    line-height: 1.6;
    font-weight: 400;

    /* 基础样式 */
    color-scheme: dark;
    color: var(--text-primary);
    font-synthesis: none;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 重置和基础样式 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg-primary);
}

/* 主内容区域 - 全局通用样式 */
main {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem;
    border-radius: 16px;
    background: rgba(26, 26, 26, 0.3); /* 透明度调整为30% */
    backdrop-filter: blur(1px); /* 模糊度调整为0.05 */
    -webkit-backdrop-filter: blur(1px); /* Safari 支持 */
    box-shadow: 0 8px 30px rgba(255, 42, 109, 0.1);
    border: 1px solid rgba(255, 42, 109, 0.2);
    animation: fadeIn 0.8s ease-out;
    width: 100%;
    min-height: 60vh;
    position: relative;
    margin: 2rem auto;
    max-width: 1200px;
    box-sizing: border-box;
}

/* 链接样式 */
a {
    font-weight: 600;
    color: var(--primary-red);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

a:hover {
    color: var(--primary-red-light);
    text-shadow: 0 0 10px var(--primary-red-glow);
}

a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-purple));
    transition: width 0.3s ease;
}

a:hover::after {
    width: 100%;
}

/* 标题样式 */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 2px 10px rgba(255, 42, 109, 0.3);
}

h1 {
    font-size: 3.2em;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.4em;
}

h3 {
    font-size: 1.8em;
}

h4 {
    font-size: 1.4em;
}

/* 按钮样式 */
button {
    border-radius: 12px;
    border: 2px solid transparent;
    padding: 0.8em 1.6em;
    font-size: 1em;
    font-weight: 600;
    font-family: inherit;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-primary);
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow);
    border-color: var(--primary-red-light);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: scale(0.97);
    box-shadow: 0 2px 10px rgba(255, 42, 109, 0.4);
}

button:focus, button:focus-visible {
    outline: 2px solid var(--accent-blue);
    outline-offset: 2px;
}

button.secondary {
    background: var(--secondary-gray);
    border-color: var(--secondary-gray-light);
}

button.secondary:hover {
    background: var(--secondary-gray-light);
    border-color: var(--accent-blue);
    box-shadow: 0 0 12px rgba(77, 195, 255, 0.5);
}

/* 卡片样式 */
.card {
    position: relative;
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2em;
    margin: 1em 0;
    border: 1px solid var(--border-secondary);
    border-image: linear-gradient(135deg, var(--primary-red), var(--primary-purple)) 1;
    box-shadow: var(--shadow-secondary);
    backdrop-filter: blur(10px);
    transition: all 0.4s ease;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 16px;
}

.card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 10px 30px rgba(255, 42, 109, 0.3), 0 0 15px rgba(211, 54, 255, 0.2);
    border-color: var(--border-primary);
}

.card-header {
    border-bottom: 1px solid var(--border-secondary);
    padding-bottom: 1em;
    margin-bottom: 1.5em;
}

/* 输入框样式 */
input, textarea, select {
    width: 100%;
    padding: 0.8em 1em;
    border: 2px solid var(--secondary-gray);
    border-radius: 8px;
    background: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 1em;
    transition: all 0.3s ease;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-purple);
    box-shadow: 0 0 10px rgba(211, 54, 255, 0.3);
}

input::placeholder, textarea::placeholder {
    background: linear-gradient(135deg, var(--primary-red-light), var(--primary-purple-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 导航栏样式 */
.navbar {
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid var(--primary-red);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-purple));
    opacity: 0.6;
    filter: blur(2px);
}

.navbar-brand {
    font-size: 1.5em;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.navbar-nav {
    display: flex;
    gap: 2rem;
    list-style: none;
    transition: all 0.3s ease;
}

.navbar-nav a {
    color: var(--text-secondary);
    font-weight: 500;
}

.navbar-nav a:hover {
    color: var(--primary-red);
    text-shadow: 0 0 8px var(--primary-red-glow);
}

/* 主容器样式 */
#app {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
    min-height: 100vh;
}

/* 网格布局 */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

/* 工具类 */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
}

.border-gradient {
    border: 2px solid;
    border-image: linear-gradient(135deg, var(--primary-red), var(--primary-purple)) 1;
}

.shadow-glow {
    box-shadow: var(--shadow-glow);
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

.pulse {
    animation: pulse 2s infinite;
}

.pulse-light {
    animation: pulse 2s infinite alternate;
}

/* 响应式设计 */
@media (max-width: 768px) {
    :root {
        font-size: 14px;
    }

    #app {
        padding: 1rem;
    }

    main {
        padding: 1rem;
        margin: 1rem;
        border-radius: 12px;
        gap: 1.5rem;
    }

    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
    }

    .navbar {
        padding: 1rem;
    }

    .navbar-nav {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 2.4em;
    }

    h2 {
        font-size: 2em;
    }

    button {
        padding: 0.6em 1.2em;
    }

    .card {
        padding: 1.5em;
    }

    main {
        padding: 0.8rem;
        margin: 0.5rem;
        border-radius: 8px;
        gap: 1rem;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    border-radius: 4px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-red-glow), var(--primary-purple-glow));
}

/* 选择文本样式 */
::selection {
    background: var(--primary-red);
    color: var(--text-primary);
}

/* 加载动画 */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--secondary-gray);
    border-top: 4px solid var(--primary-red);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* 模态框样式 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-overlay);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
}

.modal-content {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 2em;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    border: 2px solid var(--primary-red);
    box-shadow: var(--shadow-glow);
}

/* 标签样式 */
.tag {
    display: inline-block;
    padding: 0.3em 0.8em;
    background: var(--secondary-gray);
    color: var(--text-primary);
    border-radius: 20px;
    font-size: 0.8em;
    font-weight: 500;
    margin: 0.2em;
    transition: all 0.3s ease;
}

.tag.primary {
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
}

.tag.accent {
    background: var(--accent-blue);
}

.tag:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px rgba(255, 42, 109, 0.4);
}

/* 进度条样式 */
.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--secondary-gray);
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-red), var(--primary-purple));
    transition: width 0.3s ease;
}

/* 工具提示样式 */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--bg-secondary);
    color: var(--text-primary);
    padding: 0.5em 1em;
    border-radius: 6px;
    font-size: 0.8em;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    border: 1px solid var(--border-primary);
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
    bottom: 115%;
}

/* 底部组件 */
.bottom-container {
    background: rgba(26, 26, 26, 0.85);
    backdrop-filter: blur(12px);
    border-top: 2px solid var(--primary-red);
    padding: 2rem;
    margin-top: 3rem;
    text-align: center;
    position: relative;
    z-index: 10;
}

.bottom-container h3 {
    font-size: 1.4em;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary-red), var(--primary-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bottom-container p {
    font-size: 1em;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.bottom-container h4 {
    font-size: 1.1em;
    color: var(--accent-blue);
    margin-top: 1.5rem;
    font-weight: 600;
}

/* 响应式底部 */
@media (max-width: 768px) {
    .bottom-container {
        padding: 1.5rem;
        margin-top: 2rem;
    }

    .bottom-container h3 {
        font-size: 1.2em;
    }

    .bottom-container p {
        font-size: 0.9em;
    }

    .bottom-container h4 {
        font-size: 1em;
    }
}

@media (max-width: 480px) {
    .bottom-container {
        padding: 1rem;
        margin-top: 1.5rem;
    }

    .bottom-container h3 {
        font-size: 1.1em;
    }

    .bottom-container p {
        font-size: 0.85em;
    }

    .bottom-container h4 {
        font-size: 0.95em;
    }
}
